[5.x] Fix structure not being saved to collection#13479
Merged
jasonvarga merged 2 commits into5.xfrom Jan 8, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13014
The issue is that when
Collection::handleExists()on the line above gets called, it pulls the collections from the cache, which gets the dirty state attributes, which includes getting the structure, which blinks it. The one in the cache doesn't have a structure, so null gets stored in blink.Then, when the actual collection is saved in a moment, checks the blink for the structure, needs the null that was put there, and writes nothing.
This started happening since #11150 because now that the Collection class uses the HasDirtyState trait, these kick in:
cms/src/Stache/Stores/BasicStore.php
Lines 27 to 29 in fa108ea
I don't love this fix but it'll do for now until there's more time for something better.